<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header">
</head>
<body class="gray-bg">
	<div class="container-div" >
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="compPd-form">
					<div class="select-list">
						<ul>
							<li>
								年份： <select id="signYear" th:with="type=${@dict.getType('pm_year_value')}">
		                        	<option value="">请选择...</option>
				                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
				                </select>
		                    </li>
		                    <li>
								供应商： <select id="empComp" th:with="type=${@CompInfoServiceImpl.selectCompAll()}">
									<option value="">请选择...</option>
									<option th:each="dict : ${type}" th:text="${dict.compNm}" th:value="${dict.compNm}"></option>
								</select>
		                    </li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="queryCompPd()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="col-sm-12 select-table table-striped" id='compPdRpt'></div>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script th:inline="javascript">
		var prefix = ctx + "report/compPd";
		
		function queryCompPd(){
			var dom = document.getElementById('compPdRpt');
		    var url = prefix + '/queryResult';
			var param = {
					"signYear": $("#signYear option:selected").val(),
					"empComp" : $("#empComp option:selected").val()
					};
			eChartsInit(dom,url,'bar',param);
		}
		
		queryCompPd();
	</script>
</body>
</html>